<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>学生跟踪</title>
<script src="../js/global.js"></script>
<script type="text/javascript">
	$(function() {
		init();
		$("#student").combobox({
			url:'selectStu',
			method:'post',
			valueField:'id',//填充进 <option value='id'>text</option>    
			textField:'name',//标签中间（<option>text</option>）   
			/* queryParams : {
				studentName : $("#studentName").val(),
				followType : $("#followType").val(),
				followTime : $("#followTime").datetimebox('getValue'),
				nextFollowTime : $("#nextFollowTime").datetimebox('getValue'),
				isclose : $("#isLockOut").combobox('getValue')
			} */

		})
		/* $("#users").combobox({
			url:'selectUsers',
			method:'post',
			valueField:'id',//填充进 <option value='id'>text</option>    
			textField:'loginName'//标签中间（<option>text</option>）   

		}) */
	})
	function init() {
		$("#netfollowsTab").datagrid({
			url : 'selectNetfollows',
			method : 'post',
			pagination : true,
			singleSelect : true,
			toolbar : '#netfollowTool',
			queryParams : {
				studentName : $("#studentName").val(),
				followTime : $("#followTime").datebox('getValue'),
				/* nextFollowTime : $("#nextFollowTime").datebox('getValue'), */
				followState : $("#followState").combobox('getValue'),
				followType : $("#followType").combobox('getValue')
			}
		})
	}
	/*  function formatterfollowType(value, row, index) {
		 if (value == 1) {
				return "面谈";
			} else if (value == 2) {
				return "电话";
			} else {
				return "网络";
			}

	}  */

	/*  function formatterfollowState(value, row, index) {
		if (value == 1) {
			return "已回访";
		}  else {
			return "未回访";
		}
	}  */
	/*  function formatterName(value, row, index) {
		 return value.name;
	 } */
	  function formatterZName(value, row, index) {
		 return value.loginName;
	 } 
	  

		function formattercaozuo(value, row, index) {
			return "<a href='javascript:void(0)' onclick='chakan(" + index
					+ ")'>查看</a>";
		}	  
		
		/* 查看 */
	  function chakan(index){
			var data = $("#netfollowsTab").datagrid("getData");
			var row = data.rows[index];
			$("#lookNellorFrm").form("load", row);
			$("#lookNellorDialog").window("setTitle", "正在查看该跟踪者的信息");
			$("#lookNellorDialog").dialog("open");
	  }
		function lookClose(){
			$("#lookNellorDialog").dialog("close");
		}
		
	  function formatterXName(value, row, index) {
		 if(value!=null){
			 return value.name;
			}
		 
	 } 
		
		
		
	  
</script>


</head>
<body>
	<!-- 显示跟踪者信息 -->
	<table id="netfollowsTab" class="easyui-datagrid">
		<thead>
			<tr>
				<th data-options="field:'id',title:'跟踪者编号'"></th>
				<th data-options="field:'student',title:'姓名',formatter:formatterXName"></th>
				<!-- <th data-options="field:'users',title:'咨询师姓名',formatter:formatterZName"></th> -->
				<th data-options="field:'users',title:'跟踪者',formatter:formatterZName,hidden:true"></th>
				<th data-options="field:'followTime',title:'跟踪时间'"></th>
				<th data-options="field:'followType',title:'跟踪方式'"></th>
				<th data-options="field:'content',title:'内容'"></th>
				<!-- <th data-options="field:'nextFollowTime',title:'下一次跟踪时间'"></th> -->
				<th
					data-options="field:'followState',title:'回访情况'"></th>
				<th
					data-options="field:'caozuo',title:'操作',formatter:formattercaozuo"></th>
		</thead>
	</table>
	<div id="netfollowTool">
		<form id="gsy" class="easyui-form">
			<label for="name">学员名称:</label> <input class="easyui-validatebox"
				type="text" id="studentName" data-options="required:true" /> <label
				for="name">开始时间:</label> <input class="easyui-datebox" type="text"
				id="followTime" data-options="required:true" /> 
				<!-- <label for="name">结束时间:</label>
			    <input class="easyui-datebox" type="text" id="nextFollowTime"
				data-options="required:true" />  -->
				
				<label for="name">回访情况:</label> 
				<select
				id="followState" class="easyui-combobox">
				<option value="">--请选择--</option>
				<option value="上门未报名">上门未报名</option>
				<option value="报名未进班">报名未进班</option>
			</select> <label for="name">跟踪方式:</label> 
			<select id="followType"
				class="easyui-combobox">
				<option value="">--请选择--</option>
				<option value="面谈">面谈</option>
				<option value="网络">网络</option>
			</select> <a href="javascript:void(0)" onclick="init()"
				class="easyui-linkbutton" data-options="iconCls:'icon-search'">搜索</a>
		</form>
		<!-- class="easyui-validatebox" -->
	</div>




<!-- 跟踪查看 -->

<div id="lookNellorDialog" class="easyui-dialog"
		data-options="modal:true,closed:true">
		<form id="lookNellorFrm" class="easyui-form">
			<table>
				<tr>
					<td><label for="name">跟踪者编号:</label></td>
					<td><input disabled="disabled" class="easyui-validatebox"
						type="text" id="跟踪者Id" name="id" data-options="required:true" /></td>
				</tr>
				<!-- <tr>
					<td><label for="name">学生姓名:</label></td>
					<td><input disabled="disabled" class="easyui-validatebox"
						type="text" id="studentName" name="studentName"
						data-options="required:true" /></td>
				</tr> -->

				<tr>
					<td><label for="name">跟踪时间:</label></td>
					<td><input class="easyui-validatebox" type="text"
						id="followTime" name="followTime"
						data-options="required:true" disabled="disabled"/></td>
				</tr>
				<tr>
					<td><label for="name">跟踪内容:</label></td>
					<td><input class="easyui-validatebox" type="text"
						id="content" name="content" data-options="required:true" disabled="disabled"/></td>
				</tr>
				<tr>
					<td><label for="name">跟踪方式:</label></td>
					<td><select id="followType" name="followType" class="easyui-combobox" disabled="disabled">
							<option value="跟踪">跟踪</option>
							<option value="网络">网络</option>
					</select></td>
				</tr>
				<tr>
					<td><label for="name">跟踪状态:</label></td>
					<td><input class="easyui-validatebox" type="text"
						id="followState" name="followState" data-options="required:true" disabled="disabled"/></td>
				</tr>
				<tr>
					
					<td><a href="javascript:void(0)" class="easyui-linkbutton"
						onclick="lookClose()">取消</a></td>
				</tr>
			</table>
		</form>

	</div>
















</body>
</html>